﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="MessageList.aspx.cs" Inherits="App.MessageList" Theme="Alpha" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <asp:Panel ID="Panel1" runat="server">   
        <h1 class="detailNick">
            <span><asp:LinkButton ID="LinkButtonTeamInfo" runat="server" OnClick="LinkButtonTeamInfo_Click"></asp:LinkButton> <asp:Label ID="TopicName" runat="server" CssClass="topicName"></asp:Label></span>
        </h1>
        <ajaxToolkit:Gravatar ID="ImageAvatar" runat="server" DefaultImageBehavior="Identicon" CssClass="detailAvatar" />

        <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" CssClass="backLink">o úroveň výše</asp:LinkButton>

        <asp:Label ID="txtLabel" runat="server" CssClass="detailStats"></asp:Label>

        <div class="newItemForm">
            <asp:Panel ID="Panel2" runat="server">
                <div class="formTextarea">
                    <asp:Label ID="Label2" runat="server" Text="Text zprávy:"></asp:Label>
                    <asp:TextBox ID="TextBoxNewMessage" runat="server" TextMode="MultiLine" ValidationGroup="MessageValidation" MaxLength="250"></asp:TextBox>
                </div>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="TextBoxNewMessage" ErrorMessage="Nelze vložit prázdou zprávu" ValidationGroup="MessageValidation"></asp:RequiredFieldValidator>
                <div class="formButton">
                    <asp:Button ID="ButtonNewMessage" runat="server" Text="Vytvořit" onclick="ButtonNewMesage_Click" ValidationGroup="MessageValidation" />
                </div>
                <asp:Label ID="LabelInfo" runat="server" Text="Zpráva byla úspěšně vložena." Visible="False" CssClass="formMessage" style="margin-top: 15px;"></asp:Label>
            </asp:Panel>
            <ajaxToolkit:CollapsiblePanelExtender ID="collapsiblePanelExtender" runat="server" TargetControlID="Panel2" Collapsed="true" CollapsedText="Vložit novou zprávu" ExpandedText="Skrýt" CollapseControlID="txtLabel" ExpandControlID="txtLabel" TextLabelID="txtLabel" CollapsedSize="0" ExpandedSize="0"  />
        </div>
        <asp:Repeater ID="RepeaterMessagesList" runat="server">
            <HeaderTemplate>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="forumMessage">
                    <ajaxToolkit:Gravatar ID="ImageAvatar" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetMemberEmail(Container.DataItem)%>" DefaultImage="<%#GetMemberAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar" />
                    <%--<ajaxToolkit:RoundedCornersExtender ID="rce" runat="server" TargetControlID="ImageAvatar" Radius="15" Corners="All" />--%> <%--You must be fuckin' kiddin' me. :-D --%>
                    <span class="nick">
                        <asp:LinkButton ID="LinkButtonUserInfo" runat="server" CommandArgument='<%#Eval("UserID")%>' OnClick="LinkButtonUserInfo_Click"><%#GetNick(Container.DataItem)%></asp:LinkButton>                     
                        -
                        <%#Eval("Inserted", "{0:d. M. yyyy HH:mm}")%>
                        <asp:LinkButton ID="LinkButtonEditMessage" runat="server" Text="(Editovat zprávu)" CssClass="editMessage" Visible='<%#IsMessageOwner(Container.DataItem)%>' OnClick="LinkButtonEditMessage_Click" CommandArgument='<%#Eval("MessageID")%>'></asp:LinkButton>
                    </span>
                    <asp:Panel ID="Panel3" runat="server">
                        <asp:Label ID="Label1" runat="server" CssClass="forumText">
                            <%#Eval("Report")%>
                        </asp:Label>
                    </asp:Panel>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </asp:Panel>

</asp:Content>
